﻿using System;
using System.Data;
using System.Linq;
using System.Text.RegularExpressions;
using PokemonBattle.PokemonData.Rnd;
using PokemonBattle.PokemonData.Util;
using PokemonBattle.PokemonData.SQLite.DAL;

namespace PokemonBattle.PokemonData.SQLite
{
    public static class SQLiteHelper
    {

        public static DataTable GetLearnMoves(int pmId)
        {
            string sql = "select * from v_dex_learnmove where pmid=" + pmId;
            return DbHelperSQLite.ExecuteDataTable(sql);
        }



        #region tool

        public static int GetTypeId(string name)
        {
            const string sql = "select typeid from pbo_type t where t.[EnName] like '{0}' limit 1";
            return DbHelperSQLite.GetSingle(string.Format(sql, name.Trim().ToLower())).ToString().ToInt();
        }




        #endregion

    }
}
